section .text
global _start
_start:
jmp get_address    ; jump down and do a call to get the address

run:
xor rax, rax       ; zero the registers
xor rdi, rdi
xor rdx, rdx

; sys_write(stdout, message, length)
add rax, 1         ; sys_write
add rdi, 1         ; stdout
pop rsi            ; pop the message address into rsi
add rdx, 14        ; message string length
syscall

; sys_exit(return_code)
xor rax, rax
add rax, 60        ; sys_exit
xor rdi, rdi       ; return 0 (success)
syscall

get_address:
call run           ; put address of our message onto the stack

message:
db 'Hello, world!',0x0A
